package com.deer.wms.inventory.model.Inventory;

import lombok.Data;

import java.util.Objects;
import java.util.Optional;

/**
 * @Author: xu
 * @Date: 2022/07/26/15:49
 * @Description:
 */
@Data
public class InventoryVo extends Inventory {
    private Integer itemId; //物料id
    private String itemNumber;//物料编码
    private String itemName; //物料名称
    private Double qty;  //数量-erp
    private String batchNo;
    private Integer stockId;

    public String getBatchNo() {
        return Optional.ofNullable(batchNo).orElse("");
    }

    public String getItemNumberAndBatchNo() {
        return itemNumber + batchNo;
    }

    public String getItemCodeAndStock() {
        return this.itemNumber + this.stockId;

    }

}
